<?php echo $header;?>
<div class="content">
  <div class="container">

          <div class="register">
              <div class="row">

                <div class="span12">
                  <div class="lrform">
                     <h5>登陆账号</h5>
                                  <div class="form">
                                      <!-- Login form (not working)-->
                                      <form class="form-horizontal">
                                          <!-- Email -->
                                          <div class="control-group">
                                            <label class="control-label" for="email">邮箱</label>
                                            <div class="controls">
                                              <input type="text" class="input-large" id="email">
                                            </div>
                                          </div>
                                          <!-- Password -->
                                          <div class="control-group">
                                            <label class="control-label" for="email">密码</label>
                                            <div class="controls">
                                              <input type="password" class="input-large" id="password">
                                            </div>
                                          </div>
                                          <div class="control-group">
                                             <div class="controls">
                                                <label class="checkbox">
                                                <input type="checkbox"> 记住 我
                                                </label>
                                             </div>
                                          </div>                                                                               
                                          <!-- Buttons -->
                                          <div class="form-actions">
                                             <!-- Buttons -->
                                            <button type="submit" class="btn btn-primary btn_login">登陆</button>
                                            <button type="reset" class="btn btn-info">重置</button>
                                          </div>
                                      </form>
                                             Don't have Account? <a href="register.html">Register</a>
                                    </div> 
                                  </div>

                </div>
              </div>
            </div>              


  <div class="border"></div>


  </div>
</div>
<?php echo $footer ?>

<script language="javascript">
    $(document).ready(function(e){
       $('.btn_login').click(function(){

           var email  = $('#email').val();
           var pwd    = $('#password').val();
           var reUrl   = "<?php echo  base_url().$reUrl; ?>";

           var arg = {
                   'email'  : email,
                   'pwd'    : pwd,
           };

   
           $.post("<?php echo $ajaxUrl['login']?>",arg, function(data){
		        if(data.status == 1){
			        alert(data.data.msg);
			        return false;
		        }
		        else
		        {

			        location.href = reUrl;
			        return false;
		        }
		    },'json');

           return false;
         
           });
    });
</script>